package com.project.class4_12;

import java.lang.reflect.InvocationTargetException;

public class Test {
    public static void main(String[] args) {
        Class c = A.class;
        try {
//            Object o1 = c.getConstructor().newInstance();
//            System.out.println(o1);
            Object o1 = c.newInstance();
            System.out.println(o1);
        } catch (Exception e) {
            e.printStackTrace();
        }
    }
}


class A{
    public A(){
        System.out.println("产生A");
    }
}